<%--
  Created by IntelliJ IDEA.
  User: DELL
  Date: 2020/11/21
  Time: 21:25
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <link rel="stylesheet" href="layui/css/layui.css">
    <link rel="stylesheet" href="layui/css/login.css">
    <title>修改失败</title>
</head>
<body>
<div class="login-main">
    <header class="layui-elip">修改失败，无法通过验证</header>
    <header class="layui-elip" style="margin-top: 100px">
        <a href="#" onclick="ready()">返回</a>
    </header>
    <header class="layui-elip" id="time" style="margin-top: 50px"></header>
</div>
<script>
    var x=3; //利用了全局变量来执行
    function ready(){
        document.getElementById("time").innerHTML=x+"后自动跳转";
        setInterval(go, 1000);
    };
    function go(){
        x--;
        if(x>0){
            document.getElementById("time").innerHTML=x+"后自动跳转";  //每次设置的x的值都不一样了。
        }else{
            location.href='reset_pwd.jsp';  // 设置你的注册页面
        }
    }
</script>
</body>
</html>
